const mapArray = require('map-array');
const obj = {
giorgio: 'Bianchi',
gino: 'Rossi'
};
console.log(mapArray(obj, (key, value) => key + ' ' + value));

var ret = myMapArray(obj, (key, value) => key + ' ' + value)

console.log(ret)



function myMapArray(obj, fn, thisArg) {

	if(typeof obj !== 'object' || obj == null) {
		return 
	}

	var arr = []
	for(var i in obj) {
		var ret = fn.call(thisArg, i, obj[i], obj)
		arr.push(ret)
	}

	return arr
}